public class Solution {
    public int findLengthOfLCIS(int[] nums) {
        int len = nums.length;

        int tempLen = 1;//中间最长长的
        int num = nums[0];
        int retLen = 0;//结果的最长长度

        for (int i = 1; i < len; i++) {
            if (nums[i] > num) {
                tempLen++;
            } else {
                retLen = Math.max(retLen, tempLen);
                tempLen = 1;
            }
            num = nums[i];
        }

        return Math.max(retLen, tempLen);
    }
}
